package com.qf.utils;

import com.qf.controller.UserController;
import com.qf.pojo.User;

public class SecurityContextHolder {

    private static ThreadLocal<User> userTl = new ThreadLocal<>();

    public static void setContext(User user){
        userTl.set(user);
    }

    public static User getContext(){
        return userTl.get();
    }

    public static void removeContext(){
        userTl.remove();
    }
}
